{extend name="../../index/view/public/mlay" /}
{block name="title"}{$column_info.name}{/block}
{block name="style"}
<style>
.name{
	font-size: .85rem;
}
.mobile, .zhiwu{
	font-size: .7rem;
	color: #999;
	height: 1.2rem;
	overflow: hidden;
}
.small-cover{
	max-width: 70% !important;
    margin: 15% auto;
    display: block;}
.pagination{text-align: center;}
.weui-media-box__desc {
    -webkit-line-clamp: 1;
}
.weui-media-box:before{
	height: 0;
	border: none;
}
</style>
{/block}
{block name="header"}
{gt name="column_info.banner" value="0"}
<!-- Header -->
<header class="bar bar-nav bgr">
	<a class="fl external" href="javascript:;" onClick="javascript:history.back(-1);"><i class="ico ico-left"></i></a>
	<h4>辉县农商银行</h4>
</header>
<!-- END Header -->
<img class="block margin-rand w96" src="{$column_info.banner|get_file_path}"/>
{else /}
<!-- Header -->
<header class="bar bar-nav bgr">
	<a class="fl external" href="javascript:;" onClick="javascript:history.back(-1);"><i class="ico ico-left"></i></a>
	<h4>{$page_title|default=""}</h4>
	<a class="fr external" href="{:url('user/index/index')}"><i class="ico ico-user"></i></a>
</header>
<!-- END Header -->
{/gt}
{/block}
{block name="container"}
<!-- Main Container -->
<div class="">
	<div class="weui-panel__bd" id="list">
	</div>
</div>
<!-- END Main Container -->
{/block}
{block name="copyright"}
{/block}
{block name="page-footer"}
<div class="footer hidden"></div>
{/block}
{block name="script"}
<script src="__STATIC__/css/layui/layui.js"></script>
<script>
layui.use('flow', function(){
	var flow = layui.flow;
	flow.load({
	elem: '#list' ,//指定列表容器
	isLazyimg: false
	,done: function(page, next){ //到达临界点（默认滚动触发），触发下一页
	  var lis = [];
	  $(".weui-loadmore").show();
	  //以jQuery的Ajax请求为例，请求下一页数据（注意：page是从2开始返回）
	  $.get('?page='+page, function(res){
		//列表返回集合
		layui.each(res.items, function(index, item){
		  lis.push(
			'<a data="'+ item.url +'" class="weui-media-box weui-media-box_appmsg margin-rand bgw checkUrl">',
				'<div class="weui-media-box__hd">',
					'<img class="weui-media-box__thumb small-cover" src="'+ item.cover +'" alt="'+ item.title +'">',
				'</div>',
				'<div class="weui-media-box__bd">',
					'<h4 class="weui-media-box__title">'+ item.title +'</h4>',
					'<p class="weui-media-box__desc">'+ item.summary +'</p>',
				'</div>',
				'<div class="weui-media-box__ft"><i class="ico ico-right"></i></div>',
			'</a>',
		  );
		}); 
		
		//执行下一页渲染，第二参数为：满足“加载更多”的条件，即后面仍有分页
		//pages为Ajax返回的总页数，只有当前页小于总页数的情况下，才会继续出现加载更多
		next(lis.join(''), page < res.last_page);
		if(page >= res.last_page || page==1){$(".weui-loadmore").hide();}; 
	  });
	}
	});
});
</script>
{/block}